import request from '@/config/axios'

// 获取城市数据
export const getCity = () => {
  return request.get({ url: '/city/aj/getcitycode' })
}
// 获取区县
export const getArea = (citycode) => {
  return request.get({
    url: '/city/aj/get_area',
    params: {
      citycode
    }
  })
}
// 获取商铺
export const getShops = (citycode, area_id) => {
  return request.get({
    url: '/city/at/shop',
    params: {
      city_id: citycode,
      area_id: area_id
    }
  })
}

// 地理编码转换
export const getAddresscode = (address) => {
  return request.get({
    url: '/address/v3/geocode/geo',
    params: {
      key: '9c0fa230320ac844be44d455e819b722',
      address
    }
  })
}
